;
define(function (required, exports, modules) {
    var modal = require('mods/modal')
    var _csrf = $('#csrf').val()

    exports.med_del = function () {
        $('._del').click(function () {
            var user_id = $(this).attr('data-id');
            modal.confirm('确定要删除吗?', {}, function () {
                $.ajax({
                    url: '/admin/mediation/ops',
                    type: 'POST',
                    dataType: 'json',
                    data: {
                        user_id: user_id,
                        _csrf: _csrf
                    },
                    success: function (res) {
                        if (res.code == 200) {
                            modal.msg(res.msg, {}, function () {
                                window.location.reload()
                            })
                        } else {
                            modal.alert(res.msg)
                            return false
                        }
                    }
                })
            }, function () {
            })
        });
    }
})